#ifndef SCORE_WIDGET_H
#define SCORE_WIDGET_H

#include <QWidget>

#include <QList>

class QLabel;
class QProcess;
class QPushButton;
class QScrollArea;

/*!
 * Widget pour l'affichage des partitions
 */
class ScoreWidget: public QWidget {
  Q_OBJECT;

  public:
    ScoreWidget(QWidget *parent = 0);

    void initialize();
    void displayScore();

  private:
    int pageCount;
    int currentPage;

    QScrollArea *scrollArea;
    QLabel *imageLabel;

    QPushButton *prevButton;
    QPushButton *nextButton;
    QLabel *pageCountLabel;

    QProcess *lilypond;
    QList<QProcess*> *mogrify;

    void displayPage(int);

  private slots:
    void prevPage();
    void nextPage();
    void trimImages();
    void displayFirstPage();

  signals:
    void firstPageDisplayed();
};

#endif
